-
Notifications
You must be signed in to change notification settings - Fork 88
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
lora: Support RISC-V build, update to latest libtock-c and move to examples #432
base: master
Are you sure you want to change the base?
Conversation
432e65e
to
2fff49e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this should be upstreamed in this form. Adding RadioLib as a library like all other libtock-c external libraries would be great.
But this is too different from our current structure (adding maintenance overhead) and is too reliant on an external repository. This can lead to problems, like updating newlib to a version not here: https://github.com/jgromes/RadioLib/blob/master/examples/NonArduino/Tock/CMakeLists.txt and then libtock-c CI doesn't pass.
This feels a little like moving goal posts. This was moved to wip because it didn't build for RISC-V and would break the CI. Both of those issues are fixed. But now it has to include a custom build infrastructure. The newlib path issue could easily be fixed by not using the version in the path, which is probably a good idea anyway. I will have a look at re-implementing the build system, but I feel that this could be accepted in the meantime. |
2fff49e
to
79a859b
Compare
I created #443 to help with the hardcoded version paths I also updated this to use |
This builds locally for me, in the CI I see
So maybe a GCC bug in older versions that pops up when not using the cmake infrastructure? Thoughts @bradjc? |
2d5ab8a
to
9f7c65b
Compare
Okay, so this builds with |
The cmake is a useful fall back. It's part of the RadioLib CI and tested regularly. The Tock system hits a GCC bug so it's isn't as robust |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's fine to build with cmake out-of-tree, but we need PIC with our build system and want to avoid the overhead of supporting multiple build variations upstream.
ifeq ($(strip $($(LIBNAME)_SRCS)),) | ||
$(error Library "$(LIBNAME)" has no SRCS?) | ||
endif | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Basically when running the formatter in the CI, the submodules aren't cloned. So no SRCs are found as there are no wildcards.
This avoids that error.
9f7c65b
to
d5df181
Compare
Yeah, the cmake uses PIC as well. The Tock system fails to build the |
Hmm.. I'm of two minds on the cmake issue. I do think there is probably some utility in an example that shows how one could integrate libtock with an external build system, but I'm also very wary of keeping anything like that around as a first-class example that we have limited control over and an obligation to support :/. If we keep it around, I'd want CI to test it. I also have gone through Herculean efforts to ensure that minimal/standard tooling (i.e. just vanilla make) is all that is needed to get up-and-running with Tock, which we've gotten a ton of positive feedback on over the years as a design choice, and requiring cmake would run against that. I also try very hard to make sure that anything that runs as CI in the cloud is 'easy' to run locally; though there it's probably easy to follow a path similar to qemu where the local CI can run it, but wouldn't pull it in by default.... I think I lean at the moment towards:
|
158fafb
to
e0ddbe6
Compare
I removed the cmake option |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm okay dropping that 'empty lib srcs' check. I don't think that's the hardest thing to track down as an issue if you mess it up.
Signed-off-by: Alistair Francis <[email protected]>
avoid a wildcard with `rm -rf` in a script, and set the script to error out if it's somehow not in the directory we expect before `rm`'ing
Signed-off-by: Alistair Francis <[email protected]>
Signed-off-by: Alistair Francis <[email protected]>
Signed-off-by: Alistair Francis <[email protected]>
Signed-off-by: Alistair Francis <[email protected]>
Signed-off-by: Alistair Francis <[email protected]>
Signed-off-by: Alistair Francis <[email protected]>
c74470c
to
bd69ff8
Compare
Ping! It would be great to get this merged so then #456 can go ahead |
Ping! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The intent here is for the RadioLib
to be re-built on-demand if there are changes, correct? That shouldn't use EXTERN_LIBS
anywhere, see https://github.com/tock/libtock-c/blob/master/doc/compilation.md#compiling-libraries-for-tock
bd69ff8
to
b313c4e
Compare
Signed-off-by: Alistair Francis <[email protected]>
b313c4e
to
a59566f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
By no means an expert on the libtock-c
build system, but superficially this looks good to me.
Ping! |
1 similar comment
Ping! |
No description provided.